﻿using System;
using System.Windows.Forms;

namespace PQBlog
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            //this.FormBorderStyle = FormBorderStyle.None;
            
        }

        private void Form1_Activated(object sender, EventArgs e){
            if (!DbMgr.hasLogin){
                this.Hide();
                WinMgr.self.main = this;
                WinMgr.self.showLogin();
            }
        }

        private void btn_addArticle_Click(object sender, EventArgs e)
        {
            this.Hide();
            WinMgr.self.showAddDiary();
        }

        private void btn_articleMgr_Click(object sender, EventArgs e)
        {
            this.Hide();
            WinMgr.self.showDiaryView();
        }
    }
}
